package com.gopay.common.domain.cbrmb.remit;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Version;

/**
 * 跨境人民币 汇款拆单信息表
 * @CbrmbRemitSplitInfo.java
 * @author lailingyu
 * @2017-4-8 下午2:50:02  www.gopay.com.cn Inc.All rights reserved.
 */
@Entity
@Table(name="CB_RMB_REMIT_SPLIT_INFO")
public class CbRmbRemitSplitInfo implements Serializable {

	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = -6963136241207250496L;

	/**
     * 记录流水号
     */
	private long sq;

	/**
	 * 批次任务ID
	 */
	private String batchTaskId;

	/**
	 * 子汇款订单号
	 */
	private String batchTargetId;

	/**
	 * 总汇款金额
	 */
	private BigDecimal totalRemitAmt;

	/**
	 * 子订单金额
	 */
	private BigDecimal orderAmt;

	/**
	 * 创建时间
	 */
	private Date createdTime;

	/**
     * 乐观锁版本号
     */
    private int version;

	public CbRmbRemitSplitInfo() {
	}

	@Id
	@SequenceGenerator(name="CB_RMB_REMIT_SPLIT_INFO_SQ_GENERATOR", sequenceName="CB_RMB_REMIT_SPLIT_INFO_SEQ")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="CB_RMB_REMIT_SPLIT_INFO_SQ_GENERATOR")
	@Column(name = "SQ", unique=true, nullable=false)
	public long getSq() {
		return sq;
	}

	public void setSq(long sq) {
		this.sq = sq;
	}

	@Column(name = "BATCH_TASK_ID")
	public String getBatchTaskId() {
		return batchTaskId;
	}

	public void setBatchTaskId(String batchTaskId) {
		this.batchTaskId = batchTaskId;
	}

	@Column(name = "BATCH_TARGET_ID")
	public String getBatchTargetId() {
		return batchTargetId;
	}

	public void setBatchTargetId(String batchTargetId) {
		this.batchTargetId = batchTargetId;
	}

	@Column(name = "TOTAL_REMIT_AMT")
	public BigDecimal getTotalRemitAmt() {
		return totalRemitAmt;
	}

	public void setTotalRemitAmt(BigDecimal totalRemitAmt) {
		this.totalRemitAmt = totalRemitAmt;
	}

	@Column(name = "ORDER_AMT")
	public BigDecimal getOrderAmt() {
		return orderAmt;
	}

	public void setOrderAmt(BigDecimal orderAmt) {
		this.orderAmt = orderAmt;
	}

	@Column(name = "CREATED_TIME")
	public Date getCreatedTime() {
		return createdTime;
	}

	public void setCreatedTime(Date createdTime) {
		this.createdTime = createdTime;
	}

	@Version
	@Column(name="VERSION")
	public int getVersion() {
		return version;
	}

	public void setVersion(int version) {
		this.version = version;
	}
}
